Graphics information and theory

CLIPPING.ZIP Polygon clipping
DOS32VBE.ZIP DOS32VBE - Small doc on using SVGA with DOS32.
FRUSTUM.ZIP Frustum Clipping Is a vital, yet neglected subject. I haven't read any documents on it yet on the web. So, now I will show you my findings on the subject, which should prove to be enough for you to implement frustum clipping in your engine.
GRAPHICS.ZIP Explanation of VGA and VESA programming using c/c++
MADVDOC.ZIP Document about some basic vector things with Asm src
MCGA_TUT.ZIP Mcga graphics tutorial
MODEX.ZIP Introduction to mode x
NURBS.ZIP About Nonuniform Rational B-Splines - NURBS
OTMPOLY.ZIP Complete HOW TO of polygons
POLYCOLL.ZIP How to do Collision point of two non-rotating polygons
TB_XMODE.ZIP A trainer/tutor to the 320x400x256 xmode. SOurce code displaying a picture in this mode is included.
TWEAKDOX.ZIP Tweaking the videomode 13h into modex
UNIFAQ.ZIP Unisys lzw patent frequently asked questions
WATER.ZIP Water Water is a really nice effect, one of the better tricks around. Its also pretty simple to code, should take no more than an afternoons work to get a good water routine.
VGATUT1.ZIP VGA Tutorial, Demonstrates 3 different methods of writing pixels to a VGA screen.
VGATUT2.ZIP VGA Tutorial part 2 This tutorial is about lines, circles & how to draw them.
VGATUT3.ZIP Vga tutorial part 3 , the palette
VGATUT4.ZIP Vga tutorial part 4, polygons

Color/Palette programming files

COLORQ_1.ZIP Perform variance-based color quantization on a "full color" image.
EXPODUS.ZIP PaletteTricks in pascal
FADE2.ZIP FADE2 -- Turbo Pascal Fade Unit Includes: GrabPal, Blackout, FadeIn, FadeOut, and ResetTextMode procedures! SOURCE CODE INCLUDED
FADECODE.ZIP FADECODE ASM and C source codes for fade out, fade in, palette morphing palette rotation, etc.
FADER.ZIP Simple color-fader in Pascal
FADERCOT.ZIP Fader, asm source
FAKE_MOD.ZIP The official fakemode documentation source code included experience 3840 colors on standard vga !!!
FD2BLK.ZIP Fading example in pascal
INTENSE.ZIP High Intense Colors in Pascal UltImate Force presents a SOURCE CODE of a Turbo Pascal utility! Now you can use High Intense Background Colors.
MEDCUT.ZIP MEDCUT , Median Cut Algorithm, Reduces True Color Images to Palette based Images Turbo Pascal Version 5 and up.
NLB-FADE.ZIP Fade routine explanation , full source code included!
PALETTE.ZIP Palette.C - VGA mode13h palette manipulation (v1.0)
PALETTE1.ZIP palette.cpp C++ functions for blend, map, and set palette.
PALETTE4.ZIP PaletteTricks in Pascal
PALROT.ZIP Palette rotate Well, here's a file that shows how a palette rotate could be done. The advantage of this way is that it's just as easy to rotate both directions, and it doesn't require any additional memory, like backup copies of the palette or the such...
RGBHSL.ZIP Pascal code to convert between RGB and HSL colorspace.
VGA-VUL2.ZIP Palette tricks in assembler. Well, here's another fine source-code by Vulture. This time I will cover the palette. I have used a copple of these routines before (VGA-VUL1.ZIP) but I thought it might be usefull to explain things in detail. As always the code is documented but there are a few things that may need sum more explanation. That is what I am gonna do in this file...
VLAMODEX.ZIP 256 colour cycling by vla (asm only)

GIF/PNG/JPG/TIFF/PCX/AVI/FLI files

BGIF17.ZIP Graphics file dumper 1.7 (C Source only) Handles GIF, PCX, LBM, TGA
BOBPCX.ZIP This C code shows a 320x200 256 color MCGA/VGA PCX file
CAVI32.ZIP CAVI: Creates AVI video from static bitmap images (C source+exe)
DISPCX.ZIP This program displays a pcx with a resoultion of 320x200
DUMPING4.ZIP This is the DOS executable and BPascal source of DUMPING. DUMPING checks a PNG file and dumps its content to the screen. It conforms to the PNG (Portable Network Graphics) Specification, 9th Draft, and it should be able to detect any errors in a given PNG file.
FLIP3206.ZIP FLIP32 v0.6B FLIP32 is a WATCOM C/C++ package which demonstrate you how to play Autodesk Animator's FLI files under flat 32-bit protected mode environment. 32-bit protected mode FLI animation player. gives you all the basics to code the superb animation player of your fooliest dreams :) source code for TASM+WATCOM+WLINK
GIF.ZIP GIF loader and decompressor in basic
LBPNG080.ZIP libpng 0.8, PNG graphics format library in C
LPNG089C.ZIP libpng 1.0 beta 3 - Version 0.89, header file for png reference library. This is a C library to help you implement PNG support in your programs.
PCXSEE.ZIP This unit reads a pc paintbrush pcx file and shows it on the screen. } the picture may have 2,4 16 or 256 colors and be cga, ega, mcga or vga. } the picture will be displayed until a key is pressed.
PCXVIEW.ZIP PCX loading and displaying program (C source)
PNGCHE_1.ZIP authenticate a PNG file This program checks the PNG identifier with conversion checks, the file structure and the chunk CRCs. In addition, relations and contents of most defined chunks are checked, except for decompression of the IDAT chunks.
PNGSUITE.ZIP Example PNG graphics files
PTOT.ZIP Ptot.c Convert PNG (Portable Network Graphic) file to TGA (Truevision TGA File Format). Takes a filename argument on the command line.
SFLI10.ZIP SFLI v1.0 A nice FLI player with 100% ASM source and dox
SVGAPCX.ZIP SVGA Vesa PCX Loader 640x480x256
TIF256.ZIP Tiff256 graphics library extensions for c programmers version 4.0 Is a library of C routines which extend the capabilities of the VSA256 Graphics Library. With TIFF256 the C programmer has the tools necessary to read, display, and write Tagged Image File Format (TIFF) images using a 256 color video adapter running with the VESA BIOS Extensions. Support is provided for both Microsoft C and Borland C products. The name "TIFF256" reflects the fact that this library supports the 256 color video modes defined within the VESA standard.
TWEAKFLC.ZIP Flic player with source included. Can play both 320x200 and 320x400 .FLI and .FLC animation files. Written in Pascal + ASM.

Graphics Scrolling/Panning

EXPLAIN.ZIP Hardware Scrollies .... Everything You Might Dream Of
FASTSCRL.ZIP Fast Scrolling in Mode X
MODEXPAN.ZIP Some panning routines! (Asm src)
MWSTAR.ZIP Tiny Parallax Starfield These files are a modification of my winning entry to the small, randomized ~200 star 4+ speed parallax scroller speed competition. The code delivers multicolor stars at many different scroll rates, exceeding the specifications of the competition. (asm source)
PANING.ZIP Panning sourcecode in asm
SCROLL.ZIP Asm scrollsource
SCROLL2.ZIP This is a simple program to demonstrate one way to scroll a Page up or down using mode X. (c source)
SLUG.ZIP Pixelpan.aSm -- ega/vga pixel panning routines
SMOOTH.ZIP Smooth scrolling for the EGA/VGA
SOURCE.ZIP This is the sourcecode for a simple 8-way scrolling demo. It includes everything except the low-level pixel copying functions, which were written in assembly and gathered in the modexc.Lib file. I expect that these are pretty standard functions, although your library no doubt uses different names and perhaps slightly different arguments.
VERTSCR.ZIP Verticla Scroller by Dreaden / VLA [Full ASM source code included]

Plasma effects

200PLASM.ZIP Highly optimized PLASMA Size : 200 bytes ASM Source incld
4KAPSINI.ZIP Interference Plasmademo with Asm src
CPLASMA.ZIP cplasma - Real Color plasma clouds demo This file implements the real color plasma demostration using the plasma routines and palette rotation using the VGA 320x200x256 mode.
ESCPLASM.ZIP Plasma demo with asm src
FRACTALS.ZIP Plasma in Pascal
ONLY394.ZIP ONLY394 - Plasma demo The worlds smallest plasma effect This plasma effect is based on the code Sten Roger Sandvik from X3M Productions made. BUT THIS ONE IS ONLY 394 BYTES BIG. FULL source code in assembler.
PLASMA.ZIP Alan's Plasma Version 5.0 (Basic source)
PLASMA3.ZIP MORE Plasma - btf '95 Uses hi-res VGA modex stuff to get a nice output Full code, exe & some palettes to try
QPLASMA.ZIP QPlasma 1.0 in Quick Basic
QUADPLAS.ZIP Quadratic Plasma (Qbasic source)
TERRAFOR.ZIP Terraforming , The Plasma Algorithm
WPLASMA.ZIP Wplasma - Runtime Sinus Wave Plasma Demostration. This file implements a runtime real plasma using sinus overlapping waves at random speeds using the VGA 320x80x256 mode.

Vector Graphics

CIRCLE.ZIP Circle routine in assembly (PC)
CIRCLE1.ZIP Fast Circle drawing program , with C source
CIREL.ZIP Couple good simple routines Circle, Ellipse, Hyperbol Very good if you want to make clear code Src: C++ 3.1 and little asm
CMLINE10.ZIP Heavly optimized line drawing algorithm, with inner loop faster than Bresenham. (asm)
FPOLY256.ZIP This is a y mode (320x200x256 colors, 4 pages) polygon and line blitter package.
LINEDRW.ZIP Line-drawing routine in assembly
POLY.ZIP A fast C polygon drawing demonstration (Borland code)
RASPOLY.ZIP C polygon drawing demonstration (Borland code)
TIRFI3.ZIP A little triangle fill routine with Asm src
TURBOCRC.ZIP Circle drawing routine in asm to be called from turbo pascal
VECTORCN.ZIP Programs For Calculating New Vectors By Combining Old Vectors. with C++ source

PC Graphics sources

360X480.ZIP Since i received a large number of requests for code examples on how to set and use the 360x480x256 color mode on the vga card i am posting some turbo pascal code routines and code fragments that demonstrate the use of this mode.
3DSTARS.ZIP 3D-stars (pascal source)
640X32.ZIP How to do 640x32x256c graphix in mode 13H Full TP source included.
ALIAS.ZIP Short: Bitmap Scaling/Rotating/Antialiasing Filter prototyper C/PASCAL/ASM This program is a prototyper designed for at least the 486 processors. Preferably pentiums. It provides lots of code with a couple strategies in two to three languages for rotating and scaling a bitmap texture. It has has grayscale bilinear, trilinear, etc post antialiasing filtering as well as real-time color bilinear filtering through a lookup matrix.
ALIASPAS.ZIP This is an scaling/rotation/antialiasing prototyping program (pascal)
BEZIER.ZIP Forward Difference Long Integer Bezier Draw
BLOBS.ZIP blobs experiments (C source)
CIRBOOST.ZIP Cirrus 542x Booster! with Asm source
COLLIDE.ZIP sample code for very fast pixel-precision collision detection. This code should be easy to add to any existing sprite engine that uses bounding-box collision detection. The one limitation is that sprites are assumed to be of less than 32 pixels in width (although it would be reasonably easy to extend the code to allow 64-pixel wide sprites). See the file COLLIDE.DOC for more information.
EXPLO203.ZIP Eexplod 2.03, A free fireworks program supporting vga/ega/hercules/cga graphics. Many parameters can be given to alter the shape, size, density, number, and the speed of the explosions. C source
FADERS.ZIP Fast wreal fadecodes for asm, turbo pascal & quick-basic. Understandable sourcecodes included fade-out and fade-in (without buffers only for txt mode but easy changeable to grafix mode.
FEPSTAR2.ZIP 2D Star Effect with shadin (c++ source)
FIRE.ZIP Firedemo with C++ source
FIREASM.ZIP Firedemo with Asm source
FIREKIT.ZIP FIREKIT v1.0 (Realistic!) Is an assembly language routine which generates a series of images which simulates fire. Through the use of a single data structure the application programmer can effect almost every single variable in the flame routine providing a wide array of visual effects. The FIREKIT application program, FLAME.EXE, allows you to manipulate all of these variables in real time with the keyboard.
FLAG.ZIP Program to model a waving flag with asm src
FLAG1.ZIP Flag demo with Pascal source
FLAMOOT.ZIP FLamoot VGA SetUp 1.0 Coded by Type One / TFL-TDV for VGA settings in -= CONTRAST =- demo. supports HARDWARE 160x100 256 col (4 gfx pages chained !!!!) * the way to do the fastest rotative zoomers ever seen on C !!!!
FULLR_1.ZIP Full Screen Rotation ,C source This code demonstrates a number of things: - Full screen image rotation/scaling using a reverse transformation algorithm. - Simple fixed point math. - Loading 320X200X256 PCX files. - Palette manipulation. - How to get into a square aspect ratio, in 320X200X256 CHAINED mode.
GCCSRC.ZIP A DOS MPEG player, based on the Berkeley decoder. Includes full sources, compilable by GCC. C source.
HANDYVGA.ZIP Very usefull vga-routines (if ya wanna learn ASM)...
IMAGSTUF.ZIP Here are some simple image manipulation functions for 320x200x256 mode graphics. (C/asm)
JVESA10.ZIP JVESA 1.0 A unit for TP 7.0 that uses the 256 color VESA modes and provides mouse support for them.
LENS.ZIP Lens effect (magnifying glass) effect code
LENS1.ZIP Lens effect in Asm/Basic
LFBPROF.ZIP VBE 2.0 Linear Framebuffer Profiler Simple program to profile the speed of screen clearing and full screen BitBlt operations using a VESA VBE 2.0 linear framebuffer from 32 bit protected mode. For simplicity, this program only supports 256 color SuperVGA video modes that support a linear framebuffer.
LIKTWK17.ZIP LikTwiik v1.7� Videomodes up to your ears! (ASM)
LSPSPR.ZIP Linear Space Partitioning Sprite, for Game Programming
LVGAPCX.ZIP This file contains a set of unit written in pascal wich alow the loading of 640x480 x 256 color files in vga mode. The image is stored in the 0 page. This program is intended to be used as a development tool for programmers needing to load hi resolution pcx images into their programs.
MATRIX.ZIP matrix demo source A simple little animation, like flying over an infinite tiled plane. Basically this is the floor effect from Doom (though I'd just like to point out that the original implementation of this (on an Acorn Archimedes) was done long before anyone ever realised you could use a PC for playing games, let alone writing Doom!)
MODES.ZIP MODES.ASM - To switch from mode 03h (80x25x16 text) to mode 013h (320x200x256 graphics) without using the VGA BIOS. This sample also demonstrates the setting of the text mode font, and the use of a custom palette.
MOUSE256.ZIP Setmouse, This example program shows how to create a multi-colored mouse Cursor with Fastgraph in 256-color XVGA and SVGA graphics modes. The program calls an assembly language function SETMOUSE (in the file SETMOUSE.ASM) that stores the mouse cursor screen and cursor masks in Fastgraph's internal data area.
NTREKSRC.ZIP 3D Star Field function (C source)
OBJECT16.ZIP Example program for 3d sprite putting with c/c++ Puts 3d sprites as a series of vertical columns.
PATT-SRC.ZIP Small .ASM source of a pattern. 8086 and VGA or < needed...
PLASMA1.ZIP Plasma demo
PSCALE.ZIP Simple asm routine to scale a bitmap either to the screen or to another bitmap. In terrible need of optimization, it's been done in borland c++ 3.1 With tasm 3.1
QUAKE.ZIP Creates an Earthquake effect
RASTER9.ZIP Raster Bars 1st try in Intel, ASM Source code included
RAYTRACE.ZIP Test of height mapping in C
ROTAT.ZIP Realtime Bitmap Rotation Routine
ROTATE.ZIP A fast algorithm for rotating bitmaps
ROTATE10.ZIP An rotating example on how to rotate a font (Asm)
SCALE.ZIP Hi guys, here is a bit of code for bitmap scaling. I'm sure that it's all been seen before but it may help someone.
SCROLL1.ZIP Scrolling example with C source
SHADE1.ZIP Shadeline (pascal)
SHADEBOB.ZIP This code implements bop shades using a gray palette of 64 levels in the VGA 320x200x256 graphics mode. (asm/pas)
SKY.ZIP SKY: fast example code to draw a sky plane, as seen in Tim Clarke's MARS demo. Includes 2x2 dithering of the sky map. For Turbo Pascal/MASM, but easily modified for C or TASM.
SVPRTPIX.ZIP Putpixel in vesa svga mode 640x480x256 (asm)
UNCHAIN2.ZIP UNCHAIN, Planar VGA Mode 13h Enforcer v2.1 Aids in the debugging of planar modes, aka "Mode X" within IDE's such as BC, TC, BP, TP, TASM, TPROF, TD and others Also, Palette restoring & page viewing
VBE20.ZIP INFO: VESA BIOS EXTENSION (VBE) Core Functions Version 2.0. Enclosed document contains the VESA BIOS Extension (VBE) specification for standard software access to graphics display controllers that support resolutions, color depths, and frame buffer organizations beyond the VGA hardware standard. It is intended for use by both applications programmers and system software developers.
VESA.ZIP VESA graphics functions in pascal
VID.ZIP VIDEO.ASM - Direct Video Access Routines for TASM Version 1 This is a module of FAST direct video routines for TASM. At this time they are released to the public domain. Much thanks to Brian Foley for FASTWR.PAS (Turbo Pascal V3 Inline Assember Screen Routines) which gave much insight on screen positioning and snow suppresion (horiz retrace waiting)
WOBBLER.ZIP Wobbler effect
XSCALEBM.ZIP Mode-x bitmap scaling in ASM
XTREEM01.ZIP Xtreem, nice unit for tp70 with lots of usefull routines in it... Put y'r vga in any mode you want ! asm/tp source
XV_PC17.ZIP XView-PC: Graphical User Interface for Pascal/C/C++ The XView-PC graphical user interface attempts to be similar to the XView toolkit used in Sun workstations, in a simplified form.
XVGA256.ZIP Pascal unit for X-Mode (VGA/MCGA 320x200 256 colors) Supports a variety of graphics routines, including texture mapping. Built mostly in assembly, and includes compression algorithms for it's own image, palette and font-format.
YAK_WAVE.ZIP Water-wave-effect + documented source
ZOOM_EX.ZIP ASM source for zooming a picture